﻿using Ninject;
using Nx.Bootstrappers;
using Nx.Kernel;
using Nx.UI.Navigation;

namespace Nx.Extensions
{
    /// <summary>
    /// NxUIExtension registers a singleton INavigationModel. Required for all modules using navigation mechanics.
    /// </summary>
    public class NxUIExtension : IBootstrapperExtension
    {
        public void Extend(IKernel kernel)
        {
            kernel.RegisterTypeIfMissing<INavigationModel, NavigationModel>(true);
        }

        public string Name
        {
            get { return "Nx.UI Extension"; }
        }
    }
}
